﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Company.WFBase
{
    public partial class FrmChild : Form
    {
        public FrmChild()
        {
            InitializeComponent();
        }

        // 有参构造函数，可以利用参数传数据
        public FrmChild(string date):this()   // this()是调用无参构造函数，避免了代码重复
        {
            this.Text = date;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            // 这里的this是新创建的窗体frmChild
            this.DialogResult = DialogResult.OK;
            this.Tag = "OKOKOKOKOK";
            this.Close();
        }

    }
}
